<template>
	<view>
		<view class="meng" v-if="this.flag==true">
			<image src="../../static/down.png" style="width: 750rpx;height: 600rpx;"></image>
		</view>
		<view class="con">
			<image src="../../static/bg/dphone.png" class="img2" style="width: 300rpx;height: 600rpx;"></image>
		<!-- 	<view @click="down()" class="btn">
				<u-icon name="photo" color="#2979ff" size="28"></u-icon>
			</view> -->
			<view class="btn" @click="down()">
				<u-icon name="android-fill" color="#6FA4FF" size="50"></u-icon>
				<view>安卓下载</view>
			</view>
			<view class="btn">
				<u-icon name="apple-fill" color="#6FA4FF" size="50"></u-icon>
				<view>IOS下载</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		components: {},
		data() {
			return {
				url:"",
				flag:false
			};
		},
		// 
		onLoad() {
			this.downFn()
			var ua = navigator.userAgent.toLowerCase();
			if (ua.match(/MicroMessenger/i) == "micromessenger") {
				this.flag=true
			}
			
		},
		onShow() {},

		//下拉刷新
		onPullDownRefresh() {},
		methods: {
			async downFn(){
				let res=await this.get("/index/versionUpdate")
				// console.log(res)
				this.url=res.data.download_url
			},
			down(){
				window.location.href = this.url
			}
		}
	}
</script>
<style scoped>
	.btn{
		line-height:90rpx;
		border-radius: 10rpx;
		text-align: center;
		width: 400rpx;
		height: 90rpx;
		background: #FFFFFF;
		opacity: 1;
		border-radius: 50rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #6FA4FF;
		margin: 20rpx;
		font-size: 30rpx;
	}
	.con{
		display: flex;
		/* justify-content: space-around; */
		padding-top: 200rpx;
		flex-direction: column;
		align-items: center;
		height: 100vh;
		background-image: url(../../static/bg/dbg.png);
		background-repeat: no-repeat;
		background-size: 750rpx 100vh;
	}
	.con>.img1{
		width: 400rpx;
		height: 130rpx;
	}
	.meng{
		width: 100%;
		height: 100vh;
		background-color: rgba(0,0,0,0.5);
		position: fixed;
		top: 0;
		left: 0;
		z-index: 9;
	}
</style>
